<template>
  <!-- 收藏测试页 -->
  <div>
    <button class="btn" @click="postStar(1)">收藏1</button>
    <button class="btn" @click="postStar(2)">收藏2</button>
    <button class="btn" @click="postStar(3)">收藏3</button>
    <button class="btn" @click="postStar(4)">收藏4</button>
    <button class="btn" @click="postStar(5)">收藏5</button>
    <button class="btn" @click="postStar(6)">收藏6</button>
    <button class="btn" @click="postStar(7)">收藏7</button>
    <button class="btn" @click="postStar(8)">收藏8</button>
    <button class="btn" @click="postStar(9)">收藏9</button>
  </div>
</template>
<script>
export default {
  methods: {
    postStar(id) {
      console.log(id);
      this.$axios({
        url: "/post_star/" + id
      }).then(res => {
        console.log(res.data);
      });
    }
  }
};
</script>

<style lang="less" scoped>
div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: center;
  padding: 2.778vw;
  .btn {
    width: 27.778vw;
    height: 13.889vw;
    color: darkslateblue;
    font-weight: 700;
    font-size: 5vw;
    margin-top: 2.778vw;
    background: cadetblue;
  }
}
</style>